package com.qxsx.midi.activity.study;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.qxsx.midi.R;
import com.qxsx.midi.activity.base.BaseActivity;
import com.qxsx.midi.config.AppContext;
import com.qxsx.midi.utils.MyNet;
import com.qxsx.midi.utils.SPUtils;
import com.qxsx.midi.utils.callBackJsonArray;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by LYJ on 2015/9/16.
 * 考试指南
 */
public class AboutMiDiMaxActivity extends BaseActivity implements OnClickListener {
    private RelativeLayout rl_1, rl_2, rl_3, rl_4, rl_5, rl_6, rl_7, rl_8, rl_9, rl_10, rl_11;
    String url;
    Intent intent = new Intent();
    String name;
    String id;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_aboutmidi);
        setTitle("关于迷笛");
        setNavBtn(R.mipmap.back, 0);
        findById();
    }

    private void findById() {
        rl_1 = (RelativeLayout) findViewById(R.id.rl_about1);
        rl_1.setOnClickListener(this);
        rl_2 = (RelativeLayout) findViewById(R.id.rl_about2);
        rl_2.setOnClickListener(this);
        rl_3 = (RelativeLayout) findViewById(R.id.rl_about3);
        rl_3.setOnClickListener(this);
        rl_4 = (RelativeLayout) findViewById(R.id.rl_about4);
        rl_4.setOnClickListener(this);
        rl_5 = (RelativeLayout) findViewById(R.id.rl_about5);
        rl_5.setOnClickListener(this);
        rl_6 = (RelativeLayout) findViewById(R.id.rl_about6);
        rl_6.setOnClickListener(this);
        rl_7 = (RelativeLayout) findViewById(R.id.rl_about7);
        rl_7.setOnClickListener(this);
        rl_8 = (RelativeLayout) findViewById(R.id.rl_about8);
        rl_8.setOnClickListener(this);
        rl_9 = (RelativeLayout) findViewById(R.id.rl_about9);
        rl_9.setOnClickListener(this);
        rl_10 = (RelativeLayout) findViewById(R.id.rl_about10);
        rl_10.setOnClickListener(this);
    }

    @Override
    protected void HandleTitleBarEvent(TitleBar component, View v) {
        switch (component) {
            case LEFT:
                finish();
                break;
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rl_about1:
                name = "北京迷笛音乐学校";
                id = "music_school";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id", id);
                startActivity(intent);
                break;
            case R.id.rl_about2:
                name = "迷笛音乐节";
                id = "music_festival";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about3:
                name = "太湖迷笛营";
                id = "taihu_midi";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about4:
                name = "迷笛全国音乐考级";
                id = "modern_music";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about5:
                name = "中国摇滚迷笛奖";
                id = "rock_midi";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about6:
                name = "迷笛音乐俱乐部";
                id = "midi_club";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about7:
                name = "孩子们的迷笛";
                id = "children_midi";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about8:
                name = "迷笛出品";
                id = "midi_produce";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about9:
                name = "北京国际爵士音乐节";
                id = "beijing_jazz";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id",id);
                startActivity(intent);
                break;
            case R.id.rl_about10:
                name = "迷笛电子音乐节";
                id = "electronic_music";
                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
                intent.putExtra("title", name);
                intent.putExtra("id", id);
                startActivity(intent);
                break;
//            case R.id.rl_about11:
//                intent.setClass(AppContext.getContext(), AboutMiDiActivity.class);
//                startActivity(intent);
//                break;

        }

    }


}
